package com.zhu.service;

import com.zhu.mapper.AreaMapper;
import com.zhu.pojo.Area;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AreaService {
    @Autowired
    private AreaMapper areaMapper;

    public void areaadd(Area area){areaMapper.areaadd(area);}

    public List<Area> areaList(){
        return areaMapper.arealist();
    }
    public List<Area> search(String name){
        return areaMapper.search(name);
    }
    public void update(List<Area> list){
        for(Area a:list){
            areaMapper.update(a);
        }
    }

    public void delete(Area area){
        areaMapper.delete(area);
    }
}
